package cn.edu.ctbu.controller.user;

import cn.edu.ctbu.VO.DishDetailVO;
import cn.edu.ctbu.entity.Dish;
import cn.edu.ctbu.result.Result;
import cn.edu.ctbu.service.IDishService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jakarta.servlet.http.PushBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("用户端菜品相关接口")
@RequestMapping("/user/dish")
@Api(tags = "用户端菜品相关接口")
public class DishController {
    @Autowired
    IDishService iDishService;

    /***
     * 获得菜品列表
     */
    @GetMapping("/category")
    @ApiOperation("获得菜品")
    public Result<List<DishDetailVO>> Category(){
        List<DishDetailVO> list=iDishService.getDishes();
        return Result.success(list);
    }
}
